package com.organ.base.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import lombok.Data;


@Data
@Component
public class FileConfig implements InitializingBean {

	@Value("${minio.url}")
	private String accessUrl;
	
	@Value("${minio.access-key}")
	private String accessKey;
	
	@Value("${minio.secret-key}")
	private String secretKey;

	public static String ACCESS_URL;
	
	public static String ACCESS_KEY;
		
	public static String SECRET_KEY;
	
	public static String BUCKET_NAME="weimeilayer";
	
	@Override
	public void afterPropertiesSet() throws Exception {
		ACCESS_URL=accessUrl;
		ACCESS_KEY=accessKey;
		SECRET_KEY=secretKey;
	}
}
